package com.neuedu.javase.io;

import java.io.Serializable;

/**
 * @auth 金山老师
 * title:   书籍代码
 * creatime: 2022-10-05 13:35
 * 描述 : 课程
 */
public class Course  implements Serializable {


//    private static long serialVersionUID =  1L;
    private static final long serialVersionUID = 1;
    private String courseName;
    private transient String password;  //密码 不希望序列化的 transient 暂态
    private Double numbers; //相对course1.obj文件 ， 新加了一个字段


    public Course() {
    }


    public Course(String courseName, String password) {
        this.courseName = courseName;
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

//    public Double getNumbers() {
//        return numbers;
//    }
//
//    public void setNumbers(Double numbers) {
//        this.numbers = numbers;
//    }

//    @Override
//    public String toString() {
//        return "Course{" +
//                "serialVersionUID=" + serialVersionUID +
//                ", courseName='" + courseName + '\'' +
//                ", password='" + password + '\'' +
//                ", numbers=" + numbers +
//                '}';
//    }


    @Override
    public String toString() {
        return "Course{" +
                "courseName='" + courseName + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
